package cn.bdqn.test;

public class Test1 {
    public static void main(String[] args) {
        AddThread at = new AddThread();
        for (int i = 1; i <=10 ; i++) {
            Thread t = new Thread(at,"线程"+(i));
            t.start();
            try {
                t.join();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        //调用方法计算总和
             at.add();
    }
}
